/*
 * @Author       : NaN 353362604@qq.com
 * @Date         : 2023-06-29 14:00:12
 * @LastEditTime : 2023-08-14 15:24:06
 * @LastEditors  : NaN 353362604@qq.com
 * @FilePath     : \AdminStration\src\Common\Router\FrontRouter.jsx
 * @Description  :
 */

import { lazy } from 'react'
import { project } from '../Data'
const { client_id } = project[window.location.hostname]

const other = ['jtgj']

const Front = lazy(() => import(`../../Pages/Front/${client_id}`))
const Home = lazy(() => import(`../../Pages/Front/${client_id}/Home`))
const Page = lazy(() => import(`../../Pages/Front/${client_id}/Page`))
const Other = lazy(() => import(`../../Pages/Front/${client_id}/Other`))

export const FrontRouter = {
    path: 'Front',
    element: <Front />,
    children: [
        { path: '', element: <Home /> },
        { path: 'Page/:page', element: <Page /> },
        // 额外页面处理
        other.includes(client_id) && { path: 'Other/:uuid', element: <Other /> },
    ],
}
